package com.example.sprintbootarithmetic.DataStructure.linkedlist;

public class SingleLinkedListDemo {
    public static void main(String[] args) {
        //测试
        //创建节点
        HeroNode hero1 = new HeroNode(1, "宋江", "及时雨");
        HeroNode hero2 = new HeroNode(2, "卢俊义", "玉麒麟");
        HeroNode hero3 = new HeroNode(3, "吴用", "智多星");
        HeroNode hero4 = new HeroNode(4, "林冲", "豹子头");
        HeroNode hero5 = new HeroNode(5, "李逵", "黑旋风");
        HeroNode hero16 = new HeroNode(6, "广生", "麻雀");
        HeroNode hero17 = new HeroNode(7, "缇娜7", "月光7");
        HeroNode hero18 = new HeroNode(8, "缇娜8", "月光8");
        HeroNode hero19 = new HeroNode(9, "缇娜9", "月光9");
        HeroNode hero20 = new HeroNode(10, "缇娜10", "月光10");
        SingleLinkedList single = new SingleLinkedList();
        single.Stackadd(hero1);
        single.Stackadd(hero2);
        single.Stackadd(hero4);
        single.Stackadd(hero3);
        single.Stackadd(hero5);
        single.listitem(single.getHead());
        /* *//**---------------------------------*//*
        single.addOrderby(hero16, single.getNewnode());
        single.addOrderby(hero17, single.getNewnode());
        single.addOrderby(hero18, single.getNewnode());
        single.addOrderby(hero19, single.getNewnode());
        single.addOrderby(hero20, single.getNewnode());
        HeroNode nodde = single.Nodeping2(single.getNewnode(), single.getHead());
        System.out.println("第一个单链表为");
        single.listitem(single.getNewnode());
        System.out.println("第二个单链表为");
        single.listitem(single.getHead());
        System.out.println("合并的单链表为：");
        single.listitem(nodde);
        System.out.println("----反向遍历------");
        single.ListOrderDescby(nodde);*/
    }
}
